/**
 * 
 */
package org.third.integration.ldap;

import org.opensaml.xml.security.SecurityException;
import org.opensaml.xml.security.credential.UsageType;
import org.opensaml.xml.security.criteria.EntityIDCriteria;
import org.opensaml.xml.security.criteria.UsageCriteria;

import java.security.GeneralSecurityException;
import java.security.Key;
import java.security.KeyStore;
import java.security.UnrecoverableEntryException;
import java.util.Collections;

/**
 * @author gongyo
 *
 */
public class LdapClientTest {
    public static void main(String[] args) throws Exception {
        KeyStore keyStore = KeyStore.getInstance("JKS");
        keyStore.load(LdapClientTest.class.getResourceAsStream("samlKeystore.jks"), "1qaz!QAZ".toCharArray());
        System.out.println(keyStore.getCertificate("idm"));

        String keyPasswords = "";
        KeyStore.PasswordProtection keyPassword = null;
        keyPassword = new KeyStore.PasswordProtection(keyPasswords.toCharArray());

        KeyStore.Entry keyStoreEntry = null;
        keyStoreEntry = keyStore.getEntry("idm", keyPassword);
    }

}
